package com.gzhryc.dictionary.dao.enums;

public class ConfigInfoEnum {

    public static enum DataType {

        StringType(1, "字符串类型"), IntegerType(2, "整型")
        , LongType(3, "长整型"), DoubleType(4, "浮点型")
        , DateType(5, "时间类型"), BooleanType(6, "布尔类型");

        private Integer index;
        private String note;

        DataType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            DataType[] temp = DataType.values();
            for (int i = 0; i < temp.length; i++) {
                DataType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
}
